package cn.bugstack.dao;

import cn.bugstack.domain.po.PayOrder;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;

/**
 * @Author: 小新
 * @Date: 2025/3/18 18:29
 * @Description:
 * @Version: v1.0
 */


@Mapper
public interface IOrderDao {

    /**
     * 添加订单
     * @param payOrder
     */
    void insert(PayOrder payOrder);


    /**
     * 查询未支付的订单
     * @param payOrder
     * @return
     */
    PayOrder queryUnPaidOrder(PayOrder payOrder);


    /**
     * 更新订单支付信息
     * @param payOrder
     */
    void updateOrderPayInfo(PayOrder payOrder);


    /**
     * 更新订单支付成功
     * @param order
     */
    void changeOrderPaySuccess(PayOrder order);


    /**
     * 查询未支付的订单
     * @return
     */
    List<String> queryNoPayNotifyOrder();


    /**
     * 查询需要关单的列表
     * @return
     */
    List<String> queryTimeoutCloseOrderList();


    /**
     * 关单
     * @param orderId
     * @return
     */
    boolean changeOrderClose(String orderId);


}
